<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Index</title>
</head>
<body>
<a href="/admin/create">New Entry</a><br />
<hr />
<h1><a href="/">Hello App Engine!</a></h1>
<hr />
<fmt:setTimeZone value="Asia/Tokyo" var="tzone" />
<c:forEach var="e" items="${postList}">
<fmt:formatDate value="${e.date}" pattern="yyyy/MM/dd HH:mm:ss" />
<font size=5>
${f:h(e.title)}
</font>
<c:set var="editUrl" value="/admin/edit/${f:key(e.key)}/${e.version}"/>
<a href="${f:url(editUrl)}">Edit</a>
<br />
${f:br(f:nbsp(f:h(e.content)))}
<hr />
</c:forEach>
</body>
</html>